﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Hasiu.Entity.Product>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Save</title>
    <link href="/css/zhx.css" rel="stylesheet" type="text/css" />
    <script src="/js/zhx.js" type="text/javascript"></script>
</head>
<body>
    <form class="yz" action="" method="post">
        <table class="table_frame">
            <tr class="header">
                <td colspan="100">
                    <%= Model == null ? "添加苗木" : "修改苗木" %>
                </td>
            </tr>
            <tr>
                <td>苗木名</td>
                <td>
                    <input type="text" style="width:400px;" name="Name" value="<%= Model == null ? "" : Model.Name %>" class="{required:true}" />
                </td>
            </tr>
            <tr>
                <td>苗木类型</td>
                <td>
                    <select name="ProductTypeId" class="{required:true}">
                        <option value="">请选择</option>
                        <% 
                            var queryProductType = Hasiu.Service.ProductTypeService._.GetList();
                            foreach (var v in queryProductType)
                            {
                                bool bj = false;
                                if (null != Model && Model.ProductTypeId.Equals(v.Id))
                                {
                                    bj = true;
                                }
                        %>
                        <option value="<%= v.Id %>"<%= bj ? " selected='selected'" : "" %>><%= v.Name %></option>
                        <%
                            }
                        %>
                    </select>
                </td>
            </tr>
            <tr>
                <td>介绍</td>
                <td>
                    <textarea name="Content" style=" width:100%; height:500px;" class="edit">
                        <%= Model == null ? "" : Model.Info %>
                    </textarea>
                </td>
            </tr>
            <tr class="footer">
                <td colspan="2">
                    <input class="btnSave" type="submit" value="保存" />
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
